<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<% String path = request.getContextPath(); request.setCharacterEncoding("UTF-8");
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">   
<head>
<base href="<%=basePath%>">
<title>人险保单查询</title>
<jsp:include page="/WEB-INF/jsp/common/common.jsp"></jsp:include>	
<link href="css/calendar.css"  rel="stylesheet" type="text/css" >
<link rel="stylesheet" href="<%=path%>/css/zTreeStyle/zTreeStyle.css">
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="<%=path%>/js/jquery.ztree.excheck-3.5.js"></script>
<script src="<%=path%>/js/jquery.divbox.js" type="text/javascript"></script>
<style type="text/css">
.sub-title {
    background: none repeat scroll 0 0 #ffffff;
    font-size: 100%;
    font-weight: bold;
    height: 30px;
    line-height: 30px;
    text-indent: 10px;
    width: 100%;
}
</style>
	<script language="javascript" type="text/javascript">
		var defaultBranch;//保存默认机构的值
		$(document).ready(function() {
			isReadyIframe();
			
			loadPrivilegeBranchSelect();//加载机构下拉框
			
// 			queryLifePolicy();
			
			defaultDate();
		});
		
		function isReadyIframe(){
			var iframe = $(window.parent.document).find("#iframe").length;
			if(iframe==0){
				window.location.href="<%=basePath%>index.jsp";
			}
		}
		
		//加载机构下拉框
		function loadPrivilegeBranchSelect(){
			$.ajax({
					url : "<%=path%>/lifePolicyList/queryPrivilegeBranch?"+new Date().getTime(),
					type : 'POST',
					async : false,
					dataType:'json',
					success : function(result) {
						if(result){
							if($.validate(result))return;

							//接口下拉框对象
							var privilegeBranchSelect = document.getElementById("privilegeBranch");
							privilegeBranchSelect.length=0;
							
							var data = result.data;
							if(data.length > 0){
								defaultBranch = data[0].deptCode;
									
								for (var i = 0; i < data.length; i++) {
									var option = new Option();
									option.text = data[i].deptCname;
									option.title = data[i].deptCname;
									option.value = data[i].deptCode;
									
									privilegeBranchSelect.add(option);
								}
							}
						}
					}
				});
		 }
		
		//所选机构改变时，清空相关联数据
		function clearBranchRelaField(){
			$("#dptCode").val("");
			$("#partnerNo").val("");
			$("#subPartnerNo").val("");
		}
		
		//------------------------------------------ 出单机构 开始----------------------------------------------
		//打开出单机构窗口
		function openDeptDiv(pageIndex,obj){
			
			if($.trim($('#privilegeBranch').val()).length == 0){
				$.message("error", "请先选择机构");
				return;
			}
			
			$('#deptCode').val('');
			$('#deptCname').val('');
			$("#"+obj.id).blur();
			queryCoreDept(pageIndex);
		}

		//查询出单机构
		function queryCoreDept(pageIndex){
			var size = 8;
			var deptCode = $.trim($('#deptCode').val());
			var deptCname = $.trim($('#deptCname').val());
			var parentDeptCode =  $.trim($('#privilegeBranch').val());
			
			$.openLoading();
			$.ajax({
				url : "<%=path%>/lifePolicyList/queryDeptByDeptAndParentDeptCode",
				type : 'POST',
				async : true,
				data:{
					size:size,
					pageIndex:pageIndex,
					deptCode:deptCode,
					deptCname:deptCname,
					parentDeptCode:parentDeptCode
				},
				dataType:'json',
				success:function(page){
					$.closeLoading();
					if($.validate(page))return;
					
					var radioObj ="<input class='input_fxk' name='deptradio' type='radio' value=''>";
					var fieldNames = "deptCode,deptCNname";
					var tableContent = creatTable1(fieldNames,page,radioObj);
					var tableObj = $("#deptTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					
					var strPage = creatChannelPage3(pageIndex,6,page.maxPage,"18");
					var pageDIV = $("#deptPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
					
					$("#deptDiv").OpenDiv();
					
					bindradio();
				}
			});
		}

		//点击“确定” ，选择 出单机构
		function chooseDept(){
			var selectedDept= $("input[name='deptradio']:checked");
			if(selectedDept.length==0){
				$.message("error", "请选择一个出单机构");
				return;
			}
			var deptCode = selectedDept.parent().parent().children(" td:eq(1)").html();
			$('#dptCode').val(deptCode);
			
			closeCurrentDIV('deptDiv');
		}

		//------------------------------------------ 出单机构 结束----------------------------------------------
		
		//------------------------------------------ 合作伙伴 开始----------------------------------------------
		//打开合作伙伴 窗口
		function openChannelInfoDiv(pageIndex,obj){
			if(($.trim($('#privilegeBranch').val())).length==0){
				$.message('error',"请先选择机构");
				return;
			}
			$('#channelCode').val('');
			$('#channelName').val('');
			$("#"+obj.id).blur();
			queryTradPartners(pageIndex);
		}
		
		//查询 合作伙伴
		function queryTradPartners(pageIndex){
			var size = 8;
			var parentDeptCode = $.trim($('#privilegeBranch').val());
			var channelCode = $.trim($('#channelCode').val());
			var channelName = $.trim($('#channelName').val());
			
			$.openLoading();
			$.ajax({
				url : "<%=path%>/lifePolicyList/queryChannelInfoOfLife",
				type : 'POST',
				async : true,
				data:{
					pageIndex:pageIndex,
					size:size,
					parentDeptCode:parentDeptCode,
					channelCode:channelCode,
					channelName:channelName
				},
				dataType:'json',
				success:function(page){
					$.closeLoading();
					if($.validate(page))return;
					
					var radioObj ="<input class='input_fxk' name='partnerradio' type='radio' value=''>";
					var fieldNames = "channelCode,channelName";
					var tableContent = creatTable1(fieldNames,page,radioObj);
					var tableObj = $("#channelInfoTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					
					var strPage = creatChannelPage2(pageIndex,6,page.maxPage,"16");
					var pageDIV = $("#channelInfoPageDIV");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage);
					
					$('#channelInfoDiv').OpenDiv();
					
					bindradio();
				}
			});
		}
		
		//点击“确定”按钮，选择合作伙伴
		function choosePartner(){
			var selectedPartner = $("input[name='partnerradio']:checked");
			if(selectedPartner.length==0){
				$.message("error", "请选择一个合作伙伴");
				return;
			}
			var selectedPartnerNo = selectedPartner.parent().parent().children(" td:eq(1)").html();
			$('#partnerNo').val(selectedPartnerNo);
			$("#subPartnerNo").val("");
			
			closeCurrentDIV('channelInfoDiv');
		}
		
		//------------------------------------------ 合作伙伴 结束----------------------------------------------
		
		//------------------------------------------ 合作伙伴子机构 开始----------------------------------------------
		//加载subChannelTree
		function openSubChannelTreeDiv(){
			var partnerNo = $.trim($('#partnerNo').val());
			if(partnerNo.length==0){
				$.message("error", "请先选择合作伙伴");
				return;
			}
			
			$.openLoading();
			$.ajax({
				url : "<%=path%>/lifePolicyList/querySubChannelTree?"+new Date().getTime(),
				type : 'POST',
				async : true,
				data:{
					parentChannelCode:partnerNo
				},
				dataType:'json',
				success:function(data){
					$.closeLoading();
					if($.validate(data))return;
					
					if(data.length == 0){
						$.message("error", "所选合作伙伴下没有合作伙伴子机构");return;
					}
					var setting = {
							check: {
								enable: true,
								chkStyle: "radio",
								radioType: "all"
							},
							data: {
								simpleData: {
									enable: true
								}
							}
						};
	
					$.fn.zTree.init($("#subChannelTree"), setting, data);
					
					$("#subChannelTreeDiv").OpenDiv();
				}
			});
		}
		
		//点击“确定”按钮，选择合作伙伴子机构
		function chooseSubPartner(){
			var subChannelTree = $.fn.zTree.getZTreeObj("subChannelTree");
			if(subChannelTree.getCheckedNodes(true).length==0){
				$.message("error", "请选择一个合作伙伴子机构");
				return;
			}
			var subChannels = subChannelTree.getCheckedNodes(true);
			$("#subPartnerNo").val(subChannels[0].id);
			
			closeCurrentDIV('subChannelTreeDiv');
		}
		
		//------------------------------------------ 合作伙伴子机构 结束----------------------------------------------
		
		
		//“重置”查询条件
		function  resetCriteria(){
			$('#downloadlifePolicyFileForm input[type!="button"]').val("");
			$('#downloadlifePolicyFileForm select[name!="privilegeBranch"]').val("");
			$("#privilegeBranch").val(defaultBranch);//机构置为默认机构
		}
		function bindredio(){
			$("input[name='radioTradProdType']").click(function(){
				$("input[name='radioTradProdType']").parent().parent().removeClass("table_highlighter");
				$(this).parent().parent().addClass("table_highlighter");

		   	});
		}
		
		//点击“查询”
		function queryLifePolicy(pageIndex){
			var downloadFlag = false;
			if(pageIndex == null){
				pageIndex = 1;
			}
			if(pageIndex == -1){
				pageIndex = 1;
				downloadFlag = true;
			}
			
			var asyncFlag = true;
			if(pageIndex == -1){
				asyncFlag = false;
			}
			
			if (checkConditions()) {
				var jsonDate = checkConditions()
			} else {
				return false
			}
			
			jsonDate.pageIndex = pageIndex
			
			/* var privilegeBranch = $.trim($("#privilegeBranch").val());//机构
			var dptCode = $.trim($("#dptCode").val());//出单机构
			// var bbrName = $.trim($("#bbrName").val());//被保险人姓名
			var partnerNo = $.trim($("#partnerNo").val());//合作伙伴
			var subPartnerNo= $.trim($("#subPartnerNo").val());//合作伙伴子机构
			var bbrCertiCode= $.trim($("#bbrCertiCode").val());//被保险人证件号
			var polSubDateBegin=  $.trim($("#polSubDateBegin").val());//保单提交日期
			var polSubDateEnd=  $.trim($("#polSubDateEnd").val());
			var polBeginDateBegin=  $.trim($("#polBeginDateBegin").val());//保单生效日期
			var polBeginDateEnd=  $.trim($("#polBeginDateEnd").val());
			var polno =$.trim($("#polno").val());//保单号
			var polStatus =$.trim($("#polStatus").val());//保单状态
			var jsonDate = {
                    pageIndex:pageIndex,
                    privilegeBranch:privilegeBranch,
                    dptCde:dptCode,
                    partnerNo:partnerNo,
                    partnerSubCode:subPartnerNo,
                    bbrCertiCode:bbrCertiCode,
                    polSubDateBegin:polSubDateBegin,
                    polSubDateEnd:polSubDateEnd,
                    polBeginDateBegin:polBeginDateBegin,
                    polBeginDateEnd:polBeginDateEnd,
                    polno:polno,
                    stateId:polStatus
                }
			
			
            // 日期区间为提交日期一年之内或者生效日期一年之内 
			var subBeginDate = (jsonDate.polSubDateBegin&&jsonDate.polSubDateEnd)?dateAddYear(jsonDate.polSubDateBegin, 0):-1
			var subEndDate = (jsonDate.polSubDateBegin&&jsonDate.polSubDateEnd)?dateAddYear(jsonDate.polSubDateEnd, 1):0
			var polBeginDate =  (jsonDate.polSubDateBegin&&jsonDate.polSubDateEnd)?dateAddYear(jsonDate.polBeginDateBegin, 0):-1
	        var polEndDate =  (jsonDate.polBeginDateBegin&&jsonDate.polBeginDateEnd)?dateAddYear(jsonDate.polBeginDateEnd, 1):0

			if ((subBeginDate - subEndDate < 0) && (polBeginDate - polEndDate < 0)) {
				$.message('error', '请选择近一年的日期区间！')
				return false 
			}
			
	        // 综合控制  如果没录被保人证件号  带素引的条件必录一个
	        if (!jsonDate.bbrCertiCode && !jsonDate.dptCode && !jsonDate.partnerNo && !jsonDate.partnerNo && !jsonDate.polno && !privilegeBranch) {
	              $.message('error', '请选择机构、出单机构、合作伙伴、保单号必录一项！')
	              return false 
	        } */
	        
	        // 清空并隐藏总量数据
	        summaryHide()
	        
			$.openLoading();
			$.ajax({
				url : "<%=path%>/lifePolicyList/queryLifePolicyPageByCriteria",
				type : 'POST',
				async : asyncFlag,
				dataType:'json',
				data: jsonDate,
				success:function(page){
					$.closeLoading();
					if($.validate(page))return;
					if(page.result == 'noChannelInfo'){
						//清空表格数据
						$("#lifePolicyTable").find("tbody").remove();
						$("#lifePolicyPageDiv").html("");
	                    $.message("error", "查询数据为空，请正确填写查询条件和页码。");

						// 清空总量
						// $("#countValidPolicy").text("0");
						// $("#totalPremium").text("0");
						// $("#countOfCancel").text("0");
						// $("#totalPremiumOfCancel").text("0");
						
						// if(downloadFlag){
						// 	$.message("error", "导出数据为空");
						// }
						return;
					}

					// 查询数据为空
					if (page.data.length ===0) {
						//清空表格数据
                        $("#lifePolicyTable").find("tbody").remove();
                        $("#lifePolicyPageDiv").html("");
	                    $.message("error", "查询数据为空，请正确填写查询条件和页码。");
	                    return;
					}
					
					// $("#countValidPolicy").text(page.map.countOfValid);//有效保单笔数
					// $("#totalPremium").text(page.map.totalPremiumOfValid);//设置保费合计
					// $("#countOfCancel").text(page.map.countOfCancel);//注销保单笔数
					// $("#totalPremiumOfCancel").text(page.map.totalPremiumOfCancel);//设置注销保费合计
																																
					//业务处理	
					var firstbutton ="<input class='input_fxk' name='radioTradProdType' type='radio' value='#'>";
					var fieldNames = "polno,appContent,partnerName,partnerSubName,insuPlanName,bbrNum,premium,insertTimeStr,beginDateStr,endDateStr,stateId?[{'0':'试算'};{'1':'核保通过'};{'2':'承保'};{'3':'已注销'}],tradProdType@TDH";
					
					// 不在SQL中出现HTML和JS标签
					$.each(page.data ,function (i, v) {
						v.polno = '<a href="javascript:void(0);" ondblclick="polNoDetailInfoHref(this)">' + v.polno + '</a>'
					})
					
					var tableContent = creatTable1(fieldNames,page,firstbutton,null);																			
					var tableObj = $("#lifePolicyTable");
					tableObj.find("tbody").remove();
					tableObj.append(tableContent);
					// 分页不显示总条数
					/*  var strPage = creatChannelPage(pageIndex,6,page.maxPage,"27");
					//console.log(strPage)
					
					var strPage = creatSiggleChannelPage(pageIndex,"27")
					// console.log(strPage) */
					var strPage = creatChannelPage(pageIndex,6,page.maxPage,"27");

					var pageDIV = $("#lifePolicyPageDiv");
					pageDIV[0].innerHTML="";
					pageDIV.append(strPage); 
					//if(downloadFlag){
					//	if(page.data.length == 0){
					//		$.message("error", "导出数据为空");
					//		return;
					//	}
					//	
					//	$("#downloadlifePolicyFileForm").attr("action","/lifePolicyList/downloadLifePolicyFileByCriteria");
					//	$("#downloadlifePolicyFileForm").submit();
					//}
					bindredio();
				}
			});
		}
		

	//点击文件下载
	function downloadlifePolicyFile(){
		if (checkConditions()) {
            var jsonDate = checkConditions()
        } else {
            return false
        }
        
       $("#downloadlifePolicyFileForm").attr("action","<%=path%>/lifePolicyList/downloadLifePolicyFileByCriteria");
       $("#downloadlifePolicyFileForm").submit();
	}

	//弹出层表格绑定单选按钮事件，选中某个单选按钮，该按钮所在行高亮显示
	function bindradio(){
		$("input[name='prodradio']").click(function(){
			$("input[name='prodradio']").parent().parent().removeClass("table_highlighter");
			$(this).parent().parent().addClass("table_highlighter");
	   	});
		$("input[name='partnerradio']").click(function(){
			$("input[name='partnerradio']").parent().parent().removeClass("table_highlighter");
			$(this).parent().parent().addClass("table_highlighter");
	   	});
		$("input[name='deptradio']").click(function(){
			$("input[name='deptradio']").parent().parent().removeClass("table_highlighter");
			$(this).parent().parent().addClass("table_highlighter");
	   	});
	}

	//统一 关闭窗口(传入要关闭DIV的id)
	function closeCurrentDIV(obj){
			$("#"+obj).CloseDiv();	
	}

	<%-- added by gzz@2015-11-3 for shen zhen you hua begin --%>
	function polNoDetailInfoHref(obj){
			var polNo = $(obj).parent('td').parent('tr')[0].childNodes[1].childNodes[0].innerHTML;
	 		var tradProdType = $(obj).parent('td').parent('tr')[0].childNodes[12].innerHTML;
	 		$(obj).parent('td').parent('tr').find("input[name='radioTradProdType']").prop("checked",true);
	 		$("input[name='radioTradProdType']").parent().parent().removeClass("table_highlighter");
	 		$(obj).parent('td').parent('tr').addClass("table_highlighter");
	 		if('1001'==tradProdType || '1002'==tradProdType || '1004'==tradProdType || '3001'==tradProdType || '3002'==tradProdType|| '3003'==tradProdType||'3006'==tradProdType){
	 			viewDetail_singel(polNo,tradProdType);
	 		}else{
	 			$.message("error", "请求参数错误，请稍后重试！");
	 		}
	}
	function polNoDetailInfo(){
		var radioProduct = $("input[name='radioTradProdType']:checked");
		if(radioProduct.val()!=undefined){
			var polNo = $(radioProduct).parent('td').parent('tr')[0].childNodes[1].childNodes[0].innerHTML;
	 		var tradProdType = $(radioProduct).parent('td').parent('tr')[0].childNodes[12].innerHTML;
	 		if('1001'==tradProdType || '1002'==tradProdType || '1004'==tradProdType || '3001'==tradProdType || '3002'==tradProdType|| '3003'==tradProdType||'3006'==tradProdType){
	 			viewDetail_singel(polNo,tradProdType);
	 		}else{
	 			$.message("error", "请求参数错误，请稍后重试！");
	 		}
		}else{
			$.message("error", "请选择一个保单");
		}
	}
	<%--清单下载只支持团单 --%>
	function teamBBRDownLoad(){
		var radioProduct = $("input[name='radioTradProdType']:checked");
		if(radioProduct.val()!=undefined){
			var polNo = $(radioProduct).parent('td').parent('tr')[0].childNodes[1].childNodes[0].innerHTML;
			var tradProdType = $(radioProduct).parent('td').parent('tr')[0].childNodes[12].innerHTML;
	 		if('1002'==tradProdType || '3002'==tradProdType){
	 			$.dialog({
	 				type: "warn",
	 				content: "您确定下载被保险人清单吗？",
	 				onOk: function() {
	 					$('#downLoadPolNoStr').val(polNo);
	 					document.form2.action = "<%=path%>/lifePolicyList/downloadTeamPolicyBBRInfoFileByPolNo?"+new Date().getTime();
	 				    document.form2.submit();
	 				}
	 			});
	 		}else{
	 			$.message("error", "选择保单类型不支持清单下载，目前仅支持团单");
	 		}
		}else{
			$.message("error", "请选择一个保单");
		}
	}
	//详细信息查看
	function viewDetail_singel(polNo,tradProdType){
		$.ajax({
			url : "<%=path%>/lifePolicyList/queryViewDetail?+"+new Date().getTime(),
			type : 'POST',
			async:true,
			dataType:'json',
			data:{polNo:polNo,tradProdType:tradProdType},
			success : function(page) {
				
				if($.validate(page))return;
				var data = page.obj;
				console.log(data.endorseUrl);
				console.log(tradProdType);
				if('1001'==tradProdType || '3001'==tradProdType|| '3006'==tradProdType){
					if(data.policy_detail_Info!=null){
						$('#singel_polno').html(data.policy_detail_Info.polno);
						$('#singel_carNo').html(data.policy_detail_Info.cardNo);
						$('#singel_planDscp').html(data.policy_detail_Info.insuPlanName);
						$('#singel_insertTime').html(data.policy_detail_Info.insertTimeStr);
						$('#singel_days').html(data.policy_detail_Info.insureDays);
						$('#singel_productUnit').html(data.policy_detail_Info.productUnit);
						$('#singel_beginDate').html(data.policy_detail_Info.beginDateStr);
						$('#singel_endDate').html(data.policy_detail_Info.endDateStr);
						$('#singel_premium').html(data.policy_detail_Info.premiumFormatStr);
						$('#singel_amount').html(data.policy_detail_Info.amountFormatStr);
						$('#singel_spicalArran').html(data.policy_detail_Info.spicalArran);
						$('#singel_premNotax').html(data.policy_detail_Info.premNotax);
						$('#singel_premVat').html(data.policy_detail_Info.premVat);
						if(("Y"!=data.policy_detail_Info.isEpolicyl) ||  (data.policy_detail_Info.epolicyUrl ==null)){
							$("#singelIsEpolicyl").hide();
						}else{
							$("#singelIsEpolicyl").show();
							$("#singelEpolicylUrl").attr("href",data.policy_detail_Info.epolicyUrl);
						}
						//电子批单链接展示
						if(data.endorseUrl == null || data.endorseUrl == ""){
							//singelEndorseUrl
							$("#singelIsEndorseUrl").hide();
						}else {
							$("#singelIsEndorseUrl").show();
							$("#singelEndorseUrl").attr("href",data.endorseUrl);
							//singelEndorselUrl
						}
						
					}
					if(data.syr_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.syr_detail_Info;
						if('1001'==tradProdType){
							var fieldNames = "realName,certiTypeDscp,certiCode,gender?[{'1060':'未知'};{'3':'未知'};{'1061':'男'};{'1':'男'};{'1062':'女'};{'2':'女'}],birthdayStr,relaInsurerDscp,bnftProportion,bnftTurn";
							var tableContent = creatTable1(fieldNames,Page,null,null);																			
							var tableObj = $("#singel_syr_tableInfo");
							tableObj.find("tbody").remove();
							tableObj.append(tableContent);
							$('#singel_syr_tableInfo').show();
							$('#nlife_singel_syr_tableInfo').hide();
						}else if('3001'==tradProdType||'3006'==tradProdType){
							var fieldNames = "realName,certiTypeDscp,certiCode,gender?[{'1060':'未知'};{'3':'未知'};{'1061':'男'};{'1':'男'};{'1062':'女'};{'2':'女'}],birthdayStr,relaInsurerDscp,bnftProportion";
							var tableContent = creatTable1(fieldNames,Page,null,null);																			
							var tableObj = $("#nlife_singel_syr_tableInfo");
							tableObj.find("tbody").remove();
							tableObj.append(tableContent);
							$('#nlife_singel_syr_tableInfo').show();
							$('#singel_syr_tableInfo').hide();
						}
						$('#singel_syr_fd_tableInfo').hide();
					}else{
						$('#singel_syr_fd_tableInfo').show();
						$('#singel_syr_tableInfo').hide();
						$('#nlife_singel_syr_tableInfo').hide();
					}
					if(data.bbr_detail_Info!=null){
						$('#singel_bbr_realName').html(data.bbr_detail_Info.realName);
						$('#singel_bbr_certiType').html(data.bbr_detail_Info.certiTypeDscp);
						$('#singel_bbr_birthday').html(data.bbr_detail_Info.birthdayStr);
						if('1061'== data.bbr_detail_Info.gender ||'1'==data.bbr_detail_Info.gender){
							$('#singel_bbr_gender').html("男");
						}else if('1062'== data.bbr_detail_Info.gender ||'2'==data.bbr_detail_Info.gender){
							$('#singel_bbr_gender').html("女");
						}else if('1060'== data.bbr_detail_Info.gender ||'3'==data.bbr_detail_Info.gender){
							$('#singel_bbr_gender').html("未知");
						}else{
							$('#singel_bbr_gender').html("");
						}
						$('#singel_bbr_certiCode').html(data.bbr_detail_Info.certiCode);
						$('#singel_bbr_telephone').html(data.bbr_detail_Info.mobile);
					}
					if(data.tbr_detail_Info!=null){
						$('#singel_realName').html(data.tbr_detail_Info.realName);
						$('#singel_certiType').html(data.tbr_detail_Info.certiTypeDscp);
						$('#singel_birthday').html(data.tbr_detail_Info.birthdayStr);
						if('1061'== data.tbr_detail_Info.gender ||'1'==data.tbr_detail_Info.gender){
							$('#singel_gender').html("男");
						}else if('1062'== data.tbr_detail_Info.gender ||'2'==data.tbr_detail_Info.gender){
							$('#singel_gender').html("女");
						}else if('1060'== data.tbr_detail_Info.gender ||'3'==data.tbr_detail_Info.gender){
							$('#singel_gender').html("未知");
						}else{
							$('#singel_gender').html("");
						}
						$('#singel_certiCode').html(data.tbr_detail_Info.certiCode);
						$('#singel_telephone').val(data.tbr_detail_Info.mobile);
						$('#singel_email').val(data.tbr_detail_Info.email);
						$("#drive_polno").html("");
						$("#drive_telephone").val("");
						$("#drive_email").val("");
					}
					if(data.xz_detail_Info!=undefined && data.xz_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.xz_detail_Info;
						var fieldNames = "tradPlanCode,instCod,tradPlanDesc,amountFormatStr";
						var tableContent = creatTable1(fieldNames,Page,null,null);																			
						var tableObj = $("#singel_xz_tableInfo");
						tableObj.find("tbody").remove();
						tableObj.append(tableContent);
						$('#nlife_div_singel_xz_tableInfo').hide();
						$('#pre_div_singel_xz_tableInfo').show();
					}
					if(data.nlife_xz_detail_Info!=undefined && data.nlife_xz_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.nlife_xz_detail_Info;
						var fieldNames = "riskName,covName,covAmtStr";
						var tableContent = creatTable1(fieldNames,Page,null,null);																			
						var tableObj = $("#nlife_singel_xz_tableInfo");
						tableObj.find("tbody").remove();
						tableObj.append(tableContent);
						$('#pre_div_singel_xz_tableInfo').hide();
						$('#nlife_div_singel_xz_tableInfo').show();
					}
					$('#policyDetailInfo').OpenDiv();
				}else if ('1002'==tradProdType || '3002'==tradProdType){
					if(data.policy_detail_Info!=null){
						$('#team_polno').html(data.policy_detail_Info.polno);
						$('#team_bbrNum').html(data.policy_detail_Info.bbrNum);
						$('#team_planDscp').html(data.policy_detail_Info.insuPlanName);
						$('#team_insertTime').html(data.policy_detail_Info.insertTimeStr);
						$('#team_days').html(data.policy_detail_Info.insureDays);
						$('#team_productUnit').html(data.policy_detail_Info.productUnit);
						$('#team_beginDate').html(data.policy_detail_Info.beginDateStr);
						$('#team_endDate').html(data.policy_detail_Info.endDateStr);
						$('#team_appContent').html(data.policy_detail_Info.appContent);
						$('#team_amount').html(data.policy_detail_Info.amountFormatStr);
						$('#team_premium').html(data.policy_detail_Info.premiumFormatStr);
						$('#team_spicalArran').html(data.policy_detail_Info.spicalArran);
						$('#team_premNotax').html(data.policy_detail_Info.premNotax);
						$('#team_premVat').html(data.policy_detail_Info.premVat);
						if(("Y"!=data.policy_detail_Info.isEpolicyl) ||  (data.policy_detail_Info.epolicyUrl ==null) ){
							$("#teamIsEpolicyl").hide();
						}else{
							$("#teamIsEpolicyl").show();
							$("#teamEpolicylUrl").attr("href",data.policy_detail_Info.epolicyUrl);
						}
						//电子批单链接展示
						if(data.endorseUrl == null || data.endorseUrl == ""){
							//singelEndorseUrl
							$("#teamIsEndorse").hide();
						}else {
							$("#teamIsEndorse").show();
							$("#teamEndorseUrl").attr("href",data.endorseUrl);
						}
					}
					if(data.xz_detail_Info!=undefined && data.xz_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.xz_detail_Info;
						var fieldNames = "tradPlanDesc,amountFormatStr";
						var tableContent = creatTable1(fieldNames,Page,null,null);																			
						var tableObj = $("#team_xz_tableInfo");
						tableObj.find("tbody").remove();
						tableObj.append(tableContent);
						$('#nlife_div_team_xz_tableInfo').hide();
						$('#pre_div_team_xz_tableInfo').show();
						
					}
					if(data.nlife_xz_detail_Info!=undefined && data.nlife_xz_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.nlife_xz_detail_Info;
						var fieldNames = "riskName,covName,covAmtStr";
						var tableContent = creatTable1(fieldNames,Page,null,null);																			
						var tableObj = $("#nlife_team_xz_tableInfo");
						tableObj.find("tbody").remove();
						tableObj.append(tableContent);
						$('#pre_div_team_xz_tableInfo').hide();
						$('#nlife_div_team_xz_tableInfo').show();
					}
					$('#teamPolicyDetailInfo').OpenDiv();
					
				}else if('1004'==tradProdType || '3003'==tradProdType){
					if(data.policy_detail_Info!=null){
						$('#drive_polno').html(data.policy_detail_Info.polno);
						$('#drive_carNo').html(data.policy_detail_Info.cardNo);
						$('#drive_planDscp').html(data.policy_detail_Info.insuPlanName);
						$('#drive_insertTime').html(data.policy_detail_Info.insertTimeStr);
						$('#drive_days').html(data.policy_detail_Info.insureDays);
						$('#drive_productUnit').html(data.policy_detail_Info.productUnit);
						$('#drive_beginDate').html(data.policy_detail_Info.beginDateStr);
						$('#drive_endDate').html(data.policy_detail_Info.endDateStr);
						$('#drive_premium').html(data.policy_detail_Info.premiumFormatStr);
						$('#drive_amount').html(data.policy_detail_Info.amountFormatStr);
						$('#drive_spicalArran').html(data.policy_detail_Info.spicalArran);
						$('#drive_licenseno').html(data.policy_detail_Info.licenseno);
						$('#drive_usenatureDscp').html(data.policy_detail_Info.usenatureDscp);
						$('#drive_frameno').html(data.policy_detail_Info.frameno);
						$('#drive_bbrNum').html(data.policy_detail_Info.bbrNum);
						$('#drive_premNotax').html(data.policy_detail_Info.premNotax);
						$('#drive_premVat').html(data.policy_detail_Info.premVat);
						if(("Y"!=data.policy_detail_Info.isEpolicyl) ||  (data.policy_detail_Info.epolicyUrl ==null)){
							$("#driveIsEpolicyl").hide();
						}else{
							$("#driveIsEpolicyl").show();
							$("#driveEpolicylUrl").attr("href",data.policy_detail_Info.epolicyUrl);
						}
					}
					if(data.tbr_detail_Info!=null){
						$('#drive_realName').html(data.tbr_detail_Info.realName);
						$('#drive_certiType').html(data.tbr_detail_Info.certiTypeDscp);
						$('#drive_address').html(data.tbr_detail_Info.address);
						$('#drive_certiCode').html(data.tbr_detail_Info.certiCode);
						$('#drive_telephone').val(data.tbr_detail_Info.mobile);
						$('#drive_email').val(data.tbr_detail_Info.email);
						$("#singel_polno").html("");
						$("#singel_telephone").val("");
						$("#singel_email").val("");
					}
					if(data.xz_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.xz_detail_Info;
						var fieldNames = "tradPlanDesc,amountFormatStr";
						var tableContent = creatTable1(fieldNames,Page,null,null);																			
						var tableObj = $("#drive_xz_tableInfo");
						tableObj.find("tbody").remove();
						tableObj.append(tableContent);
						$('#nlife_div_drive_xz_tableInfo').hide();
						$('#pre_div_drive_xz_tableInfo').show();
					}
					if(data.nlife_xz_detail_Info!=undefined && data.nlife_xz_detail_Info!=null){
						var Page= new Object();
						Page.data  = data.nlife_xz_detail_Info;
						var fieldNames = "riskName,covName,covAmtStr";
						var tableContent = creatTable1(fieldNames,Page,null,null);																			
						var tableObj = $("#nlife_drive_xz_tableInfo");
						tableObj.find("tbody").remove();
						tableObj.append(tableContent);
						$('#pre_div_drive_xz_tableInfo').hide();
						$('#nlife_div_drive_xz_tableInfo').show();
					}
					$('#drivePolicyDetailInfo').OpenDiv();
				}else{
					$.message("error", "请求参数错误，请稍后重试！");
				}
			}
		});
	}
	<%-- added by gzz@2015-11-3 for shen zhen you hua end --%>
	//点击查询电子发票 事件
	function EinvoiceInfo(){
		showEinvoiceInfo(1);
	}

	var downloadEinvoice;
	function showEinvoiceInfo(pageNum){
		var privilegeBranch = $.trim($("#privilegeBranch").val());//机构
		var dptCode = $.trim($("#dptCode").val());//出单机构
		// var bbrName = $.trim($("#bbrName").val());//被保险人姓名
		var partnerNo = $.trim($("#partnerNo").val());//合作伙伴
		var subPartnerNo= $.trim($("#subPartnerNo").val());//合作伙伴子机构
		var bbrCertiCode= $.trim($("#bbrCertiCode").val());//被保险人证件号
		var polSubDateBegin=  $.trim($("#polSubDateBegin").val());//保单提交日期
		var polSubDateEnd=  $.trim($("#polSubDateEnd").val());
		var polBeginDateBegin=  $.trim($("#polBeginDateBegin").val());//保单生效日期
		var polBeginDateEnd=  $.trim($("#polBeginDateEnd").val());
		var polno =$.trim($("#polno").val());//保单号
		var polStatus =$.trim($("#polStatus").val());//保单状态
		
		$.openLoading();
		$.ajax({
			url : "<%=path%>/lifePolicyList/queryLifePolicyEinvoiceInfoByMap",
			type : 'POST',
			async : true,
			dataType:'json',
			data:{
				pageNum:pageNum,
				privilegeBranch:privilegeBranch,
				dptCde:dptCode,
				bbrName:'',
				partnerNo:partnerNo,
				partnerSubCode:subPartnerNo,
				bbrCertiCode:bbrCertiCode,
				polSubDateBegin:polSubDateBegin,
				polSubDateEnd:polSubDateEnd,
				polBeginDateBegin:polBeginDateBegin,
				polBeginDateEnd:polBeginDateEnd,
				polno:polno,
				stateId:polStatus
			},
			success:function(page){
				$.closeLoading();
				
				if($.validate(page))return;	
				$("#einvoiceInfoDiv").OpenDiv();
				//业务处理	
				var firstbutton =null;
				//                保单号，合作伙伴名称    ， 投保方案名称 ， 保费  
				var fieldNames = "polno,partnerName,insuPlanName,premium";
				var tableContent = creatTable1(fieldNames,page,firstbutton,null);																			
				var tableObj = $("#nlifeEinvoiceInfoDiv");
				tableObj.find("tbody").remove();
				tableObj.append(tableContent);
				var strPage = creatChannelPage(pageNum,6,page.maxPage,"86");
				var pageDiv = $("#einvoiceInfoPageDiv");
				pageDiv[0].innerHTML="<span style='float:left'>保单总笔数：<span style='color:red;'>"+page.map.EinvoiceCount + "</span>笔</span>";
				pageDiv.append(strPage); 
			}
		});
	}

	//点击导出电子发票按钮事件	
	function onEinvoiceExport(){
		
		var privilegeBranch = $.trim($("#privilegeBranch").val());//机构
		var dptCode = $.trim($("#dptCode").val());//出单机构
		// var bbrName = $.trim($("#bbrName").val());//被保险人姓名
		var partnerNo = $.trim($("#partnerNo").val());//合作伙伴
		var subPartnerNo= $.trim($("#subPartnerNo").val());//合作伙伴子机构
		var bbrCertiCode= $.trim($("#bbrCertiCode").val());//被保险人证件号
		var polSubDateBegin=  $.trim($("#polSubDateBegin").val());//保单提交日期
		var polSubDateEnd=  $.trim($("#polSubDateEnd").val());
		var polBeginDateBegin=  $.trim($("#polBeginDateBegin").val());//保单生效日期
		var polBeginDateEnd=  $.trim($("#polBeginDateEnd").val());
		var polno =$.trim($("#polno").val());//保单号
		var polStatus =$.trim($("#polStatus").val());//保单状态
		
		$.openLoading();
		$.ajax({
			url : "<%=path%>/lifePolicyList/queryLifePolicyPageByCriteria",
			type : 'POST',
			async : false,
			dataType:'json',
			data:{
				pageIndex:1,
				privilegeBranch:privilegeBranch,
				dptCde:dptCode,
				bbrName:'',
				partnerNo:partnerNo,
				partnerSubCode:subPartnerNo,
				bbrCertiCode:bbrCertiCode,
				polSubDateBegin:polSubDateBegin,
				polSubDateEnd:polSubDateEnd,
				polBeginDateBegin:polBeginDateBegin,
				polBeginDateEnd:polBeginDateEnd,
				polno:polno,
				stateId:polStatus
			},
			success:function(page){
				$.closeLoading();
				if($.validate(page))return;
				if(page.result == 'noChannelInfo'){
					
						$.message("error", "导出数据为空");
					
					return;
				}
					if(page.data.length == 0){
						$.message("error", "导出数据为空");
						return;
					}
					$("#downloadlifePolicyFileForm").attr("action","<%=path%>/lifePolicyList/downloadLifePolicyEinvoiceInfoByMap");
				 	$("#downloadlifePolicyFileForm").submit();
				bindredio();
			}
		});
	}
	//日期格式化
Date.prototype.format = function(format)
	{
		var o = {
		 "M+" : this.getMonth()+1, //month
 		"d+" : this.getDate(),    //day
	 	"h+" : this.getHours(),   //hour
 		"m+" : this.getMinutes(), //minute
 		"s+" : this.getSeconds(), //second
 		"q+" : Math.floor((this.getMonth()+3)/3),  //quarter
 		"S" : this.getMilliseconds() //millisecond
 	}
 		if(/(y+)/.test(format)) format=format.replace(RegExp.$1,
 		(this.getFullYear()+"").substr(4 - RegExp.$1.length));
 		for(var k in o)if(new RegExp("("+ k +")").test(format))
 		format = format.replace(RegExp.$1,
 		RegExp.$1.length==1 ? o[k] :
 		("00"+ o[k]).substr((""+ o[k]).length));
 		return format;
}
	
	//信保通需求，默认带出最近一个月的信息
	function defaultDate(){
		var begin=new Date();
		var end=new Date();
	    new Date(begin.setMonth((new Date().getMonth()-1)));
	    var begintime= begin.format("yyyy-MM-dd");
	    var endtime=end.format("yyyy-MM-dd");
		$("#polSubDateBegin").val(begintime);
		$("#polSubDateEnd").val(endtime);
	}
	
	// 清空并隐藏汇总
	function summaryHide() {
	    $('#summary_div').hide()
		// 清空总量
        $("#countValidPolicy").text("0");
        $("#totalPremium").text("0");
        $("#countOfCancel").text("0");
        $("#totalPremiumOfCancel").text("0");
	}
	
	// 展示汇总
	function summaryShow() {
		// 清空
		summaryHide()
		var jsonDate = checkConditions()

        if (!jsonDate) {
            $.closeLoading();
            return false
        }
	    $.openLoading();
		$.ajax({
            url : "<%=path%>/lifePolicyList/queryLifePolicyAll",
            type : 'POST',
            async : true,
            dataType:'json',
            data: jsonDate,
            success:function(data){
                $.closeLoading();
                $.each(data, function (i, v) {
                    if(v.STATE_ID === '2') {
                        $("#countValidPolicy").text(v.COUNT_TOTAL);//有效保单笔数
                        $("#totalPremium").text(v.PREMIUM_VALID);//设置保费合计
                    } else if (v.STATE_ID === '3') {
                        $("#countOfCancel").text(v.COUNT_TOTAL);//注销保单笔数
                        $("#totalPremiumOfCancel").text(v.PREMIUM_VALID);//设置注销保费合计
                    }
                })
                $('#summary_div').show()
            }
        });
	}
	
	// 校验查询条件
	function checkConditions() {
		var privilegeBranch = $.trim($("#privilegeBranch").val());//机构
        var dptCode = $.trim($("#dptCode").val());//出单机构
        // var bbrName = $.trim($("#bbrName").val());//被保险人姓名
        var partnerNo = $.trim($("#partnerNo").val());//合作伙伴
        var subPartnerNo= $.trim($("#subPartnerNo").val());//合作伙伴子机构
        var bbrCertiCode= $.trim($("#bbrCertiCode").val());//被保险人证件号
        var polSubDateBegin=  $.trim($("#polSubDateBegin").val());//保单提交日期
        var polSubDateEnd=  $.trim($("#polSubDateEnd").val());
        var polBeginDateBegin=  $.trim($("#polBeginDateBegin").val());//保单生效日期
        var polBeginDateEnd=  $.trim($("#polBeginDateEnd").val());
        var polno =$.trim($("#polno").val());//保单号
        var polStatus =$.trim($("#polStatus").val());//保单状态
        var jsonDate = {
                privilegeBranch:privilegeBranch,
                dptCde:dptCode,
                partnerNo:partnerNo,
                partnerSubCode:subPartnerNo,
                bbrCertiCode:bbrCertiCode,
                polSubDateBegin:polSubDateBegin,
                polSubDateEnd:polSubDateEnd,
                polBeginDateBegin:polBeginDateBegin,
                polBeginDateEnd:polBeginDateEnd,
                polno:polno,
                stateId:polStatus
            }
		
        
        // 综合控制  如果没录被保人证件号  带素引的条件必录一个
        if (!jsonDate.dptCode && !jsonDate.partnerNo && !jsonDate.polno) {
        	// 日期区间为提交日期一年之内或者生效日期一年之内 
            var subBeginDate = (jsonDate.polSubDateBegin&&jsonDate.polSubDateEnd)?dateAddYear(jsonDate.polSubDateBegin, 0):-1
            var subEndDate = (jsonDate.polSubDateBegin&&jsonDate.polSubDateEnd)?dateAddYear(jsonDate.polSubDateEnd, 1):0
            var polBeginDate =  (jsonDate.polBeginDateBegin&&jsonDate.polBeginDateEnd)?dateAddYear(jsonDate.polBeginDateBegin, 0):-1
            var polEndDate =  (jsonDate.polBeginDateBegin&&jsonDate.polBeginDateEnd)?dateAddYear(jsonDate.polBeginDateEnd, 1):0

            if ((subBeginDate - subEndDate < 0) && (polBeginDate - polEndDate < 0)) {
                $.message('error', '请选择近一年的日期区间或者出单机构、合作伙伴、保单号必录一项！')
                return false 
            }
        }
        
        return jsonDate
	}
	
	function downloadlifeFacadePolicyFile() {
		if (checkConditions()) {
            var jsonDate = checkConditions()
        } else {
            return false
        }
        
       $("#downloadlifePolicyFileForm").attr("action","<%=path%>/lifePolicyList/downloadLifeFacadePolicyFileByCriteria");
       $("#downloadlifePolicyFileForm").submit();
	}
	
	
	// 日期加减年且格式转换
	function dateAddYear (dateString, yearCount) {
		var newstr = (dateString.substr(0, 4) - yearCount) + dateString.substr(4)
		return new Date(newstr.replace(/-/g, "/")).getTime();
	}
		
	/**邮件重发*/
	function reSendEmail(){
		if ($('#singel_polno').html()) {
			var polNo=$('#singel_polno').html();
		}else{
			var polNo=$('#drive_polno').html();
		}
		if ($('#singel_email').val()) {
			var email=$('#singel_email').val();
		}else{
			var email=$('#drive_email').val();
		}
		var reg=/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/;
		if(!reg.test(email)){
			$.message("error", "邮箱有误！");
			return;
		}
		$.openLoading();

		$.ajax({
			url : "<%=path%>/lifePolicyList/reSendEmail?+"+new Date().getTime(),
			type : 'POST',
			async:true,
			dataType:'json',
			data:{polNo:polNo,email:email},
			success : function(result) {
				$.closeLoading();
				$.message(result.result,result.message);
			}
		});
	}
	/**短信重发*/
	function reSendSMS(){
		if ($('#singel_polno').html()) {
			var polNo=$('#singel_polno').html();
		}else{
			var polNo=$('#drive_polno').html();
		}
		if ($('#singel_telephone').val()) {
			var phoneNo=$('#singel_telephone').val();
		}else{
			var phoneNo=$('#drive_telephone').val();
		}
		var reg=/^[1][3,4,5,7,8][0-9]{9}$/;
		if(!reg.test(phoneNo)){
			$.message("error", "手机号有误！");
			return;
		}
		$.openLoading();

		$.ajax({
			url : "<%=path%>/lifePolicyList/reSendSms?+"+new Date().getTime(),
			type : 'POST',
			async:true,
			dataType:'json',
			data:{polNo:polNo,phoneNo:phoneNo},
			success : function(result) {
				$.closeLoading();
				$.message(result.result,result.message);
			}
		});
	}
	
	</script>
	
	</head>
	<body>
	<form method="POST" name="form2">
	<input type="hidden" name="polNo" id="downLoadPolNoStr">
	</form>
 	 <div class="current">
           <table class="current_table_1">
             <tbody>
              	<tr class="f2">
	                <td><img src="./images/current_1.jpg"></td>
	                <td class="current_table_1_td">
	                  <img src="images/current_1.png">&nbsp;您现在的位置：&nbsp;
	                  <span style=" color:#136bab; ">统计分析
	                  	<span style="padding:0 5px; font-weight:bold; line-height:28px;">&gt;</span>人险保单查询
	                  </span>
                  	</td>
                 	<td><img src="./images/current_3.jpg"></td>
              	</tr>
           	 </tbody>
           </table>
     </div>
       
       <!--查询条件及结果表单 -->
        <table border="1" class="table_02" style="height:150px">
	  		<tr height="50px">
	  			<td colspan="2" align="center">
	  				<form method="post" id="downloadlifePolicyFileForm"> 
						<table border="0" style="margin: 12px auto;">
							<tr>
								<td style="padding-left:40px; border: 0;text-align: right" nowrap="nowrap">机构：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
								   <select class="search_select_1" name="privilegeBranch" id="privilegeBranch" onchange="clearBranchRelaField()" style="width: 206px"></select>
								</td>
								<td style="padding-left:40px;border: 0;text-align: right" nowrap="nowrap">出单机构：</td>
		                  		<td style="border: 0;text-align: left;padding-right: 70px"><input id="dptCode" name="dptCde" type="text" readonly="readonly" style=" background-color: #ccc;" class="input_text">&nbsp;&nbsp;<input type="button"  class="input_button_5" id="searchDeptBtn" value="请选择" onClick="openDeptDiv(1,this)"/></td>
								<!-- <td style="border: 0;text-align: right;" nowrap="nowrap">被保险人姓名：</td> -->
								<td style="border: 0;text-align: left;padding-right: 70px; display:none;">
									<input name="bbrName" id="bbrName" class="input_text" style="width:130px;" size="25"/>
								</td>
								<td style="border: 0;text-align: right;" nowrap="nowrap">被保险人证件号：</td>
                                <td style="border: 0;text-align: left;padding-right: 70px">
                                    <input name="bbrCertiCode" id="bbrCertiCode" class="input_text" style="width:130px;" size="25"/>
                                </td>
							</tr>
							<tr>
								<td style="border: 0;text-align: right" nowrap="nowrap">合作伙伴：</td>
		                        <td style="border: 0 ;text-align: left; padding-right: 70px"><input name="partnerNo" id="partnerNo" readonly="readonly" onselect="" style=" background-color: #ccc;" class="input_text">&nbsp;&nbsp;<input type="button"  class="input_button_5"  id="searchPartnerBtn" value="请选择" onClick="openChannelInfoDiv(1,this)"/></td>
								<td style="border: 0;text-align: right" nowrap="nowrap">合作伙伴子机构：</td>
		                        <td style="border: 0 ;text-align: left; padding-right: 70px"><input name="partnerSubCode" id="subPartnerNo" readonly="readonly" style=" background-color: #ccc;" class="input_text">&nbsp;&nbsp;<input type="button"  class="input_button_5"  id="searchSubPartnerBtn" value="请选择" onClick="openSubChannelTreeDiv()"/></td>
								
							</tr>
							<tr>
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单提交日期：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									 <input id="polSubDateBegin" name="polSubDateBegin" readonly="readonly" onclick="showCalendar('polSubDateBegin','y-mm-dd');"   class="input_time"/>
								</td>
								<td style="border: 0;text-align: right;" nowrap="nowrap">至：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									 <input id="polSubDateEnd" name="polSubDateEnd" readonly="readonly" onclick="showCalendar('polSubDateEnd','y-mm-dd');"  class="input_time"/>
								</td>
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单号：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									<input name="polno" id="polno" class="input_text" style="width:130px;" size="25"/>
								</td>
							</tr>
							<tr>
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单生效日期：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									 <input id="polBeginDateBegin" name="polBeginDateBegin" readonly="readonly" onclick="showCalendar('polBeginDateBegin','y-mm-dd');"  class="input_time"/>
								</td>
								<td style="border: 0;text-align: right;" nowrap="nowrap">至：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
									 <input id="polBeginDateEnd" name="polBeginDateEnd" readonly="readonly" onclick="showCalendar('polBeginDateEnd','y-mm-dd');"  class="input_time"/>
								</td>
								<td style="border: 0;text-align: right;" nowrap="nowrap">保单状态：</td>
								<td style="border: 0;text-align: left;padding-right: 70px">
								   <select class="search_select_1" name="stateId" id="polStatus">
										<option value="">---请选择---</option>								   		
<!-- 								   		<option value="0">试算</option> -->
<!-- 								   		<option value="1">核保通过</option> -->
								   		<option value="2">承保</option>
								   		<option value="3">已注销</option>
								   </select>
								</td>
							</tr>
							<tr>
								<td colspan="6" style="border: 0;padding-top: 5px;padding-right: 70px">
									<input type="button"  class="input_button_1"  value="查询"    onClick="queryLifePolicy()"/>
								   	<input type="button"  class="input_button_1"  value="重置"    onClick="resetCriteria()"/>
								</td>
							</tr>
						</table>	  				
				    </form>
				</td>
	  		</tr>
	  		<tr>
	  			<td valign="top">
		  			<div id="lifePolicyDiv" style="width:98%;margin:5px" >
		  				<div align="left" style="margin:15px">
			  				<input type="button"  class="input_button_2"  value="导出Excel" onClick="downloadlifePolicyFile()"/>&nbsp;
			  				<input type="button"  class="input_button_2"  value="界面出单导出"  style="font-size: 8px" onClick="downloadlifeFacadePolicyFile()"/>&nbsp;
			  				<input type="button"  class="input_button_2"  value="详细信息" onClick="polNoDetailInfo()"/>&nbsp;
			  				<input type="button"  class="input_button_2"  value="清单下载" onClick="teamBBRDownLoad()"/>&nbsp;
			  				<input type="button"  class="input_button_2"  value="电子发票查询" onClick="EinvoiceInfo()" style="font-size: 10px"/>&nbsp;
			  				<!-- 汇总按钮 -->
			  				<input style="float: right" type="button"  onclick="summaryShow()" id="summary_btn" class="input_button_2"  value="展示汇总"/>
			  				
							<!-- 汇总点击按钮才展示 -->
							<div align="right" id="summary_div" style="margin:15px;display:none;">
								<span>有效保单笔数：</span><span id="countValidPolicy" style="color: red">0</span>笔&nbsp;&nbsp;
								<span>含税保费合计：</span><span id="totalPremium" style="color: red">0</span>元&nbsp;&nbsp;
								<span>注销保单笔数：</span><span id="countOfCancel" style="color: red">0</span>笔&nbsp;&nbsp;
								<span>注销含税保费合计：</span><span id="totalPremiumOfCancel" style="color: red">0</span>元
							</div>
				  		</div>
				  		<table class="table_02" id="lifePolicyTable">
					  		<thead>
				               <tr>
				               	  <th style="width:4%" nowrap="nowrap">选择</th>
				                  <th style="width:15%" nowrap="nowrap">保单号</th>
				                  <th style="width:8%" nowrap="nowrap">行程/航班</th>
				                  <th style="width:8%" nowrap="nowrap">合作伙伴</th>
				                  <th style="width:8%" nowrap="nowrap">合作伙伴子机构</th>
				                  <th style="width:8%" nowrap="nowrap">投保方案</th>
				                  <th style="width:5%" nowrap="nowrap">人数</th>
				                  <th style="width:9%" nowrap="nowrap">含税保费</th>
				                  <th style="width:9%" nowrap="nowrap">保单提交日期</th>
				                  <th style="width:9%" nowrap="nowrap">起保日期</th>
				                  <th style="width:9%" nowrap="nowrap">终保日期</th>
				                  <th style="width:8%" nowrap="nowrap">状态</th>
				              	</tr>
				              </thead>
			              <tbody>
						  </tbody>
			            </table>
		  				 <div id="lifePolicyPageDiv"  class="page"></div>
		  			</div>
	  			</td>
	  		</tr>
	  	</table>
       
    <!--选择出单机构 DIV 默认隐藏-->
	<div id="deptDiv" style="display:none;width:80%;">
<!--   		<input type="hidden" id="row_num" name="row_num" value="0"/> -->
		<div class="table_title_div">
			<table class="table_title" style='width:100%;height: 20px;'>
				<tr>
				<td width="10%"></td>
				<td width="80%" id="interfaceName"></td>
				<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('deptDiv')"/></td>
				</tr>
			</table>
		</div>
		<table class="table_02" id="table" style="height:180px;" align="center">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">
							 出单机构代码：<input name="txt3"  id="deptCode"  type="text" class="input_text" value="" >&nbsp;&nbsp;
							 出单机构名称：<input name="txt3" id="deptCname"  type="text" class="input_text" value="">
								       <input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryCoreDept(1)"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="deptTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:5%">选择</th>
			                  <th style="width:40%">出单机构代码</th>
			                  <th style="width:55%">出单机构名称</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="deptPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center" >
		  <input type="button" id="saveRoleBtn" value="确定" onclick="chooseDept()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		  <input type="button" value="取消" onclick="closeCurrentDIV('deptDiv')" class="input_button_3"/>
		</div>
	</div>
       
    <!--选择 合作伙伴 div 默认隐藏-->
  	<div id="channelInfoDiv" style="display:none;width:80%;">
		<div class="table_title_div">
			<table class="table_title" style='width:100%;height: 20px;'>
				<tr>
				<td width="10%"></td>
				<td width="80%" id="interfaceName"></td>
				<td width="10%" align="right"><img src="./images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('channelInfoDiv')"/></td>
				</tr>
			</table>
		</div>
		<table class="table_02" id="table" style="height:180px;" align="center">
			<tr>
				<td>
					<table class="search_table">
						<tr height="30px">
							<td colspan="3" style="text-align:center">
							 合作伙伴代码：<input name="txt3"  id="channelCode"  type="text" class="input_text" value="" >&nbsp;&nbsp;
							 合作伙伴名称：<input name="txt3" id="channelName"  type="text" class="input_text" value="">&nbsp;&nbsp;
								       <input type="button"  class="input_button_1" id="searchBtn" value="查询" onClick="queryTradPartners(1)"/>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table id="channelInfoTable"  class="content_table_1">
						<thead>
							<tr class="f1">
			                  <th style="width:5%">选择</th>
			                  <th style="width:10%">合作伙伴代码</th>
			                  <th style="width:20%">合作伙伴名称</th>
			              	</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
					<div id="channelInfoPageDIV"  class="page"></div>
				</td>
			</tr>
		</table>
		<div align="center" >
		  <input type="button" id="saveRoleBtn" value="确定" onclick="choosePartner()" class="input_button_3"/>&nbsp;&nbsp;&nbsp;
		  <input type="button" value="取消" onclick="closeCurrentDIV('channelInfoDiv')" class="input_button_3"/>
		</div>
	</div>
	
	<%--subChannelTree(选择合作伙伴子机构层) --%>
    <div id="subChannelTreeDiv" style="display: none;width:500px;margin-top: -50px" align="center">
    	<div class="table_title_div">
			<table class="table_title" style='width:500px; height: 20px;'>
				<tr>
					<td width="10%"></td>
					<td width="80%" id="interfaceName"></td>
					<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeChannelTreeDiv()"/></td>
				</tr>
			</table>
		</div>
		
		<div style="height: 300px;width:500px; overflow:auto">
			<ul id="subChannelTree" class="ztree"></ul>
		</div>
		
		<div style="text-align: center;padding: 5px">
			<input type="button" id="choseChannelBtn" value="确定" onclick="chooseSubPartner()" class="input_button_1"/>&nbsp;&nbsp;&nbsp;
			<input type="button" value="取消" onclick="closeCurrentDIV('subChannelTreeDiv')" class="input_button_1"/>
		</div>
	</div>
	<%-- 个单投保流程 --%>
	<div id="policyDetailInfo" style="display: none;width: 65%;height:75%; padding-bottom: 10px;margin-top: -50px;overflow-y:auto;">
  		<div class="table_title_div">
				<table class="table_title" style='width:100%;height: 20px;'>
					<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('policyDetailInfo')"/></td>
					</tr>
				</table>
		</div>
		<div>
		<ul style="padding-top: 8px;">
		<li style="float: left;  width: 60% "><h5 class="sub-title">基本信息</h5></li>
		<li style="float: left;  width: 20%"><span id="singelIsEpolicyl" style="height: 30px;line-height: 30px; text-indent: 10px; "><a href="" id="singelEpolicylUrl" target="_blank" style="color: blue;  text-decoration:underline;" >电子保单下载 </a></span></li>
		<li style="float: left;  width: 20%"><span id="singelIsEndorseUrl" style="height: 30px;line-height: 30px; text-indent: 10px; "><a href="" id="singelEndorseUrl" target="_blank" style="color: blue;  text-decoration:underline;" >最新批单下载 </a></span></li>
		</ul>
		</div>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">保单号：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_polno"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">单证号：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_carNo"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">投保方案：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_planDscp"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">提交日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_insertTime"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">保险天数：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_days"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">投保份数：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_productUnit"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">起保日期：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_beginDate"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">终保日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_endDate"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">含税保费：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_premium"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">不含税保费：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_premNotax"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">增值税额：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_premVat"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">总保额：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_amount"></span></td>
			</tr>
		</table>
		<h5 class="sub-title">投/被保人信息</h5>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">投保人姓名：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_realName"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">证件类型：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_certiType"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">出生日期：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_birthday"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">证件号码：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_certiCode"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">电子邮箱：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><input id = "singel_email" style="width:135px"/><input type="button" value="邮件重发" id="reSendEmail" onclick='reSendEmail()'class="input_button_2"></td>
				<td style="text-align:right;border-right: 0px;" width="15%">联系电话：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><input id = "singel_telephone" style="width:135px"/><input type="button"  value="短信重发" id="reSendSMS" onclick='reSendSMS()' class="input_button_2"></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">性别：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_gender"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%"></td>
				<td style="text-align:left;padding-left:6px;" width="35%">
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">被保人姓名：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_bbr_realName"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">证件类型：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_bbr_certiType"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">出生日期：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_bbr_birthday"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">证件号码：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_bbr_certiCode"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">性别：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "singel_bbr_gender"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">联系电话：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "singel_bbr_telephone"></span></td>
			</tr>
		</table>
		<h5 class="sub-title">受益人信息</h5>
		<table id = "singel_syr_fd_tableInfo" class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">受益人：</td>
				<td colspan="3" style="text-align:left;padding-left:6px;" width="85%">法定</td>
			</tr>
		</table>
		<table id="singel_syr_tableInfo" class="table_02" align="center" style="width: 95%;">
			<thead>
					<th width="15" nowrap="nowrap">受益人姓名</th>
					<th width="10" nowrap="nowrap">证件类型</th>
					<th width="15" nowrap="nowrap">证件号码</th>
					<th width="10" nowrap="nowrap">性别</th>
					<th width="20" nowrap="nowrap">出生日期</th>
					<th width="10" nowrap="nowrap">与被保人关系</th>
					<th width="10" nowrap="nowrap">受益比例(%)</th>
					<th width="10" nowrap="nowrap">受益顺序</th>
		    </thead>
				 <tbody>
			     </tbody>
		</table>
		<table id="nlife_singel_syr_tableInfo" class="table_02" align="center" style="width: 95%;">
			<thead>
					<th width="15" nowrap="nowrap">受益人姓名</th>
					<th width="10" nowrap="nowrap">证件类型</th>
					<th width="15" nowrap="nowrap">证件号码</th>
					<th width="10" nowrap="nowrap">性别</th>
					<th width="20" nowrap="nowrap">出生日期</th>
					<th width="10" nowrap="nowrap">与被保人关系</th>
					<th width="10" nowrap="nowrap">受益比例(%)</th>
		    </thead>
				 <tbody>
			     </tbody>
		</table>
		<div id ="pre_div_singel_xz_tableInfo" style="display: none;width: 100%;">
		<h5 class="sub-title">险种信息</h5>
		<table id= "singel_xz_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="15" nowrap="nowrap">险种代码</th>
			<th width="15" nowrap="nowrap">险种版本号</th>
			<th width="55" nowrap="nowrap">险种名称</th>
			<th width="15" nowrap="nowrap">保额</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>
		</div>
		<div id ="nlife_div_singel_xz_tableInfo" style="display: none;width: 100%;">
			<h5 class="sub-title">条款责任信息</h5>
		<table id= "nlife_singel_xz_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="45" nowrap="nowrap">条款名称</th>
			<th width="40" nowrap="nowrap">责任名称</th>
			<th width="15" nowrap="nowrap">保额</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>
		</div>
		<h5 class="sub-title">特别约定</h5>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:left;padding-left: 6px;" width="100%"><span id="singel_spicalArran" ></span></td>
			</tr>
		</table>
	</div>
	
	<%--  团单投保流程 --%>
	<div id="teamPolicyDetailInfo" style="display: none;width: 65%;height:75%; padding-bottom: 10px;margin-top: -50px;overflow-y:auto;">
  		<div class="table_title_div">
				<table class="table_title" style='width:100%;height: 20px;'>
					<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('teamPolicyDetailInfo')"/></td>
					</tr>
				</table>
		</div>
		<div>
		<ul style="padding-top: 8px;">
		<li style="float: left;  width: 60% "><h5 class="sub-title">基本信息</h5></li>
		<li style="float: left;  width: 20%"><span id="teamIsEpolicyl" style="height: 30px;line-height: 30px; text-indent: 10px; "><a href="" id="teamEpolicylUrl" target="_blank" style="color: blue; text-decoration:underline;">电子保单下载 </a></span></li>
		<li style="float: left;  width: 20%"><span id="teamIsEndorse" style="height: 30px;line-height: 30px; text-indent: 10px; "><a href="" id="teamEndorseUrl" target="_blank" style="color: blue; text-decoration:underline;">电子保单下载 </a></span></li>
		</ul>
		</div>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">保单号：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "team_polno"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">投保方案：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "team_planDscp"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">行程/航班：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "team_appContent"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">提交日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "team_insertTime"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">保险天数：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "team_days"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">起保日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "team_beginDate"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">投保份数：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "team_productUnit"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">终保日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "team_endDate"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">总人数：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "team_bbrNum"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">含税保费：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "team_premium"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">不含税保费：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "team_premNotax"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">增值税额：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "team_premVat"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">总保额：</td>
				<td colspan="3" style="text-align:left;padding-left:6px;" width="85%"><span id = "team_amount"></span></td>
			</tr>
		</table>
		<div id = "pre_div_team_xz_tableInfo" style="display: none;width: 100%;">
			<h5 class="sub-title">险种信息</h5>
		<table id= "team_xz_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="50" nowrap="nowrap">险种名称</th>
			<th width="50" nowrap="nowrap">保额</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>
		</div>
		<div id = "nlife_div_team_xz_tableInfo" style="display: none;width: 100%;">
		<h5 class="sub-title">条款责任信息</h5>
		<table id= "nlife_team_xz_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="45" nowrap="nowrap">条款名称</th>
			<th width="40" nowrap="nowrap">责任名称</th>
			<th width="15" nowrap="nowrap">保额</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>
		</div>
		<h5 class="sub-title">特别约定</h5>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:left;padding-left: 6px;" width="100%"><span id="team_spicalArran" ></span></td>
			</tr>
		</table>
	</div>
	
	<%-- 驾乘险投保流程 --%>
	<div id="drivePolicyDetailInfo" style="display: none;width: 65%;height:75%; padding-bottom: 10px;margin-top: -50px;overflow-y:auto;">
  		<div class="table_title_div">
				<table class="table_title" style='width:100%;height: 20px;'>
					<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('drivePolicyDetailInfo')"/></td>
					</tr>
				</table>
		</div>
		<div>
		<ul style="padding-top: 8px;">
		<li style="float: left;  width: 80% "><h5 class="sub-title">基本信息</h5></li>
		<li style="float: left;  width: 20%"><span id="driveIsEpolicyl" style="height: 30px;line-height: 30px; text-indent: 10px; "><a href="" id="driveEpolicylUrl" target="_blank" style="color: blue; text-decoration:underline;">电子保单下载 </a></span></li>
		</ul>
		</div>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">保单号：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_polno"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">单证号：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_carNo"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">投保方案：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_planDscp"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">提交日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_insertTime"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">保险天数：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_days"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">投保份数：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_productUnit"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">起保日期：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_beginDate"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">终保日期：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_endDate"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">含税保费：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_premium"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">不含税保费：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_premNotax"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">增值税额：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_premVat"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">总保额：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_amount"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">投保座位数：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_bbrNum"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">车辆使用性质：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_usenatureDscp"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">车架号：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_frameno"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">车牌号：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_licenseno"></span></td>
			</tr>
		</table>
		<h5 class="sub-title">投保人信息</h5>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">投保人姓名：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_realName"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">证件类型：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_certiType"></span></td>
			</tr> 
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">通讯地址：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><span id = "drive_address"></span></td>
				<td style="text-align:right;border-right: 0px;" width="15%">证件号码：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><span id = "drive_certiCode"></span></td>
			</tr>
			<tr>
				<td style="text-align:right;border-right: 0px;" width="15%">联系电话：</td>
				<td style="text-align:left;padding-left:6px;" width="35%"><input style="width:135px" id = "drive_telephone"  /> <input type="button"  value="短信重发" id="reSendSMS" onclick='reSendSMS()' class="input_button_2"></td>
				<td style="text-align:right;border-right: 0px;" width="15%">投保人邮箱：</td>
				<td style="text-align:left;padding-left:6px;border-right: 0px;" width="35%"><input id = "drive_email" style="width:135px"/> <input type="button" value="邮件重发" id="reSendEmail" onclick='reSendEmail()'class="input_button_2"></td>
			</tr>
		</table>
		<h5 class="sub-title">被保人信息</h5>
		<table id = "drive_bbr_fd_tableInfo" class="table_02" align="center" style="width: 95%;">
			<tr>
				<td colspan="4" style="text-align:center;" width="100%">发生保险责任范围内的交通事故时驾驶或乘坐本保险合同载明的车辆内的人员</td>
			</tr>
		</table>
	<%-- 	<table id= "drive_bbr_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="25" nowrap="nowrap">姓名</th>
			<th width="25" nowrap="nowrap">证件类型</th>
			<th width="25" nowrap="nowrap">证件号</th>
			<th width="25" nowrap="nowrap">联系电话</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>--%>
		<div id = "pre_div_drive_xz_tableInfo" style="display: none;width: 100%;">
			<h5 class="sub-title">险种信息</h5>
		<table id= "drive_xz_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="50" nowrap="nowrap">险种名称</th>
			<th width="50" nowrap="nowrap">保额</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>
		</div>
		<div id = "nlife_div_drive_xz_tableInfo" style="display: none;width: 100%;">
			<h5 class="sub-title">条款责任信息</h5>
		<table id= "nlife_drive_xz_tableInfo" class="table_02" align="center" style="width: 95%;">
		 <thead>
			<th width="45" nowrap="nowrap">条款名称</th>
			<th width="40" nowrap="nowrap">责任名称</th>
			<th width="15" nowrap="nowrap">保额</th>
		 </thead>
		 <tbody>
	     </tbody>
		</table>
		</div>
		<h5 class="sub-title">特别约定</h5>
		<table class="table_02" align="center" style="width: 95%;">
			<tr>
				<td style="text-align:left;padding-left: 6px;" width="100%"><span id="drive_spicalArran" ></span></td>
			</tr>
		</table>
	</div>
	
	<!-- 发票信息 ， 默认隐藏 -->
<div id="einvoiceInfoDiv" style="width: 65%;  display: none">
	  		<div class="table_title_div">
				<table class="table_title" style='width:100%;height: 20px;'>
					<tr>
						<td width="10%"></td>
						<td width="80%" id="interfaceName"></td>
						<td width="10%" align="right"><img src="<%=path %>/images/closedown.gif" alt="关闭"  onclick="closeCurrentDIV('einvoiceInfoDiv')"/></td>
					</tr>
				</table>
		</div>
	<table id= "nlifeEinvoiceInfoDiv" class="table_02" align="center" style="width: 100%;">
		
		 <thead>
			<th width="40" nowrap="nowrap">保单号</th>
			<th width="30" nowrap="nowrap">合作伙伴</th>
			<th width="15" nowrap="nowrap">投保方案</th>
			<th width="15" nowrap="nowrap">含税保费</th>
		 </thead>
			<tbody>
			</tbody>
	 </table>
	 <div id="einvoiceInfoPageDiv" class="page"></div>
	 <div id="einvoiceExport"><input type="button" value="导出"  style="float: right;" onclick="onEinvoiceExport()"></div>
</div>

	
	</body>
</html>
